package com.daur.uva.engine;

import java.util.ArrayList;
import java.util.List;

public class EngineContext {

	private List<Integer>[] stackingBoxes;

	@SuppressWarnings("unchecked")
	public EngineContext(int numerOfBoxes) {
		this.stackingBoxes = new ArrayList[numerOfBoxes];
	}

	public void addBoxToStack(Integer boxIndex, Integer biggerBoxIndex) {
		if (this.stackingBoxes[boxIndex] == null) {
			this.stackingBoxes[boxIndex] = new ArrayList<Integer>();
		}
		this.stackingBoxes[boxIndex].add(biggerBoxIndex);
	}

	public List<Integer>[] getStackingBoxes() {
		return this.stackingBoxes;
	}

}
